﻿using System;
using System.Diagnostics.Contracts;

namespace AppWorks.Domain.Events
{
    [ContractClass(typeof(IEventContracts))]
    public interface IEvent
    {
        Guid EventIdentifier
        {
            get;
        }

        DateTime EventTimeStamp
        {
            get;
        }

        Version EventVersion
        {
            get;
        }
    }

    [ContractClassFor(typeof(IEvent))]
    internal abstract class IEventContracts : IEvent
    {
        public Guid EventIdentifier
        {
            get
            {
                return default(Guid);
            }
        }

        public DateTime EventTimeStamp
        {
            get
            {
                return default(DateTime);
            }
        }

        public Version EventVersion
        {
            get { return default(Version); }
        }
    }
}